package com.cloudream.core.dto;

import com.cloudream.core.utils.SecureUtil;

import java.io.Serializable;
import java.util.Date;

public class InfoDTO implements Serializable {
    private String id;
    private String name;
    private Date createdAt;
    private long version;

    public InfoDTO initialize() {
        id = SecureUtil.uuid();
        createdAt = new Date();
        version = 0l;
        return this;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Date getCreatedAt() {
        return createdAt;
    }

    public void setCreatedAt(Date createdAt) {
        this.createdAt = createdAt;
    }

    public long getVersion() {
        return version;
    }

    public void setVersion(long version) {
        this.version = version;
    }
}